<template>
  <!-- 选择人员 -->
  <el-dialog title="选择人员" v-model="userParams.visible" @open="handleOpen" width="500" :close-on-click-modal="false">
    <div class="user-main" v-loading="loading">
      参考部门管理
    </div>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="emit('close')">返回</el-button>
        <el-button type="primary" :disabled="loading" @click="handleSubmit">提交</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup>
import { ref, nextTick } from 'vue'
// import { ElMessage } from 'element-plus'
// import { addDept, editDept } from '@views/deptManage/api/deptManage'
const props = defineProps({
  userParams: {
    type: Object,
    default: () => { },
    required: true
  }
})
const emit = defineEmits(['close'])
// const formData = reactive({ status: 1 })
const loading = ref(false)

const handleSubmit = () => {
  // 校验
}

const handleSave = async () => {
  // loading.value = true
  // const res = formData.deptId ? await editDept(formData) : await addDept(formData)
  // loading.value = false
  // if (res?.code === 200) {
  //   ElMessage.success('保存成功')
  //   emit('close', true)
  // }
}
// 初始化弹窗
const handleOpen = () => {
  nextTick(() => {
    console.log(props)
    console.log('初始化')
  })
}

</script>

<style lang="scss" scoped></style>
